<template>
  <div>
    <el-cascader :options="options"></el-cascader>
  </div>
</template>

<script>
export default {
  data() {
    return {
      options: []
    };
  },
  methods: {
    loadOptions() {
        this.$axios.get("/emps")
        .then(res => {
            if (res.data.code == 200) {
                this.options = res.data.data.vos;
            }
        })
        .catch(err => {
            console.error(err); 
        })
    }
  },
  mounted () {
    this.loadOptions();
  }
};
</script>